#pragma once
#include "config.h"

// 链表初始化
void list_init(void *list);
// 移出指定节点
void list_remove(void *list, void *node);
// 插入到某节点之前
void list_insert_before(void *list, void *before_node, void *new_node);
// 插入到某节点之后
void list_insert_after(void *list, void *after_node, void *new_node);

#define list_insert_head(_list , _node) 	list_insert_before(_list, NULL, _node)
#define list_insert_tail(_list , _node) 	list_insert_after(_list, NULL, _node)
